package com.slowfly.rule.engine.groovy;

import java.util.concurrent.TimeUnit;

public interface IScript {

    static long now() {
        return System.currentTimeMillis();
    }

    static long days(int count) {
        return TimeUnit.DAYS.toMillis(count);
    }

    static long hours(int count) {
        return TimeUnit.HOURS.toMillis(count);
    }

    static long minutes(int count) {
        return TimeUnit.MINUTES.toMillis(count);
    }

    static long seconds(int count) {
        return TimeUnit.SECONDS.toMillis(count);
    }
}
